package io.finer.erp.jeecg.bas.service;

import io.finer.erp.jeecg.bas.dto.InventoryDTO;
import io.finer.erp.jeecg.bas.dto.MaterialContrastDTO;
import io.finer.erp.jeecg.bas.entity.BasMaterialLog;
import io.finer.erp.jeecg.bas.vo.BasMaterialLogVO;
import io.finer.erp.jeecg.stock.entity.StkInventory;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.jeecg.common.api.vo.Result;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @Description: PDA物料盘点记录
 * @Author: jeecg-boot
 * @Date:   2021-05-11
 * @Version: V1.0
 */
public interface IBasMaterialLogService extends IService<BasMaterialLog> {

	/**
	 * @Description 根据物料编号或托盘编号添加物料信息记录
	 * @param codeList
	 * @return
	 * Create at: 2021-05-22 08:51:24
	 * @author: xzs
	 * Revision:
	 *    2021-05-22 08:51:24 - first revision by xzs
	 *
	 */
	public Result<?> addMaterialLog(List<String> codeList, String sheetId);
	
	
	public Result<?> queryQuantSum(BasMaterialLog basMaterialLog, HttpServletRequest req);
	
	public Result<?> queryInventSum(BasMaterialLogVO vo);
	
	/**
	 * @Description 分页查询物料盘点信息和实时库存数量
	 * @param basMaterialLog
	 * @return
	 * Create at: 2021-08-18 10:28:08
	 * @author: xzs
	 * Revision:
	 *    2021-08-18 10:28:08 - first revision by xzs
	 *
	 */
	public List<MaterialContrastDTO> queryDTOList(BasMaterialLogVO basMaterialLog);
	
	/**
	 * @Description 将盘点记录里的数量替换实时库存里的数量
	 * @return
	 * Create at: 2021-08-18 10:48:47
	 * @author: xzs
	 * Revision:
	 *    2021-08-18 10:48:47 - first revision by xzs
	 *
	 */
	public boolean replaceQty(BasMaterialLog basMaterialLog);
	
	/**
	 * @Description 此处查询实时库存数据
	 * @param vo
	 * @param page
	 * @return
	 * Create at: 2021-08-20 10:59:21
	 * @author: xzs
	 * Revision:
	 *    2021-08-20 10:59:21 - first revision by xzs
	 *
	 */
	public IPage<InventoryDTO> getInventory(BasMaterialLogVO vo, Page<InventoryDTO> page);
}
